class Solution {
public:
    int numJewelsInStones(string jewels, string stones) {
        int up[150];
        memset(up,0,sizeof(up));
        unordered_map<char,int> has;
        for(int i=0;i<jewels.size();i++)
        {
            up[(int)jewels[i]]=1;
        }
        int ret=0;
        for(int i=0;i<stones.size();i++)
        {
            ret+=up[(int)stones[i]];
        }
        return ret;
    }
};
